<?php
	header("Content-Type: text/html;charset=utf-8");
	include("function/_nosql.php"); //
	include("function/function.php");
	$kboy_userid = $_SESSION['kboy_userid'];
	$kboy_user = $_SESSION['kboy_user'];
	
	$uid = chkstr(trim($_REQUEST['uid']));
	if(empty($uid)){
		echo erro("参数错误");
	}
	if(!is_numeric($uid)){
		echo erro("参数错误");
	}
	if(getNewsNums("kboy_user","uid=$uid") <1){
		echo erro("参数错误");
	}
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>我的好友_社区_<?= $web_titles ?></title>
<meta name="Keywords" content="我的好友,社区,<?= $web_keywords ?>" />
<meta name="Description" content="<?= $web_description ?>" />
<link rel="stylesheet" href="css/common.css"/>
<link rel="stylesheet" href="css/sq.css"/>
<link rel="stylesheet" href="layer/skin/layer.css" />
<script type="text/javascript" src="js/baidutongji.js"></script>
<script type="text/javascript" src="js/laydate/laydate.js"></script>
</head>
<body>
    <!--top-bar begin-->
	<? include("_include.top.topbar.php") ?>
    <!--top-bar end-->
    <!--header begin-->
	<? include("_include.top.navbar.php") ?>
    <!--header end-->
    <!--banner begin-->
	<? include("_include.forum.banners.php") ?>
    <!--banner end-->
    <!--活动 begin-->
    <?php if($_SESSION['kboy_userid'] != $uid) {?>
    <div class="sq-wrap">
		<? include("_include.forum.title.php") ?>
        <div class="sq-bd">
			<? include("_include.forum.topnav.php") ?>
            <div class="sq-bd-con">
                <div class="sq-bd-l">
                    <div class="sq-friend-wrap">
                        <div class="sq-friend-nav"><div class="fr-nav"><a href="javascript:;" class="on">ta关注的</a> | <a href="javascript:;">ta的粉丝</a></div><span>被<i><?=getNewsNums("kboy_forum_friend","tid=$uid")?></i>个人关注</span><span>&nbsp;&nbsp;&nbsp;&nbsp;</span></div>
                        <div class="sq-fr-bd">
                            <div class="sq-fr-pane current">
                                <div class="sq-fr-list">
								
									<?php
											$news_sql = "select * from kboy_forum_friend where uid=$uid order by id desc";
											$news_rows = mysql_query($news_sql);
											while($news_rs = mysql_fetch_array($news_rows)){
									?>
                                    <dl>
                                        <dt><a href="forum_news.php?uid=<?=$news_rs['tid']?>"><img src="<?=getClassName("kboy_user","user_face","uid=".$news_rs['tid'])?>" width="72" height="72" alt=""/></a></dt>
                                        <dd>
                                            <p class="name"><a href="forum_news.php?uid=<?=$news_rs['tid']?>"><?=getUserNickName($news_rs['tid'])?></a></p>
                                            <p class="num">粉丝：<?=getNewsNums("kboy_forum_friend","tid=".$news_rs['tid'])?></p>
                                            <p class="num">徒步：<?=getClassName("kboy_user", "user_km","uid =".$news_rs['tid'])?></p>
                                        </dd>
                                    </dl>
									<?php
											}
									?>

                                    </dl>
                                </div>
                            </div>
                            <div class="sq-fr-pane">
                                <div class="sq-fr-list">


									<?php
											$news_sql = "select * from kboy_forum_friend where tid=$uid order by id desc";
											$news_rows = mysql_query($news_sql);
											while($news_rs = mysql_fetch_array($news_rows)){
									?>
                                    <dl>
                                        <dt><a href="forum_news.php?uid=<?=$news_rs['tid']?>"><img src="<?=getClassName("kboy_user","user_face","uid=".$news_rs['tid'])?>" width="72" height="72" alt=""/></a></dt>
                                        <dd>
                                            <p class="name"><a href="forum_news.php?uid=<?=$news_rs['tid']?>"><?=getUserNickName($news_rs['tid'])?></a></p>
                                            <p class="num">粉丝：<?=getNewsNums("kboy_forum_friend","tid=".$news_rs['tid'])?></p>
                                            <p class="num">徒步：<?=getClassName("kboy_user", "user_km","uid =".$news_rs['tid'])?></p>
                                        </dd>
                                    </dl>
									<?php
											}
									?>
									
									
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
				
				
				<? include("_include.forum.right.php") ?>
				
				
            </div>
        </div>
    </div>
    <?php }else{ ?>
    	<div class="sq-wrap">
		<? include("_include.forum.title.php") ?>
        <div class="sq-bd">
			<? include("_include.forum.topnav.php") ?>
            <div class="sq-bd-con">
                <div class="sq-bd-l">
                    <div class="sq-friend-wrap">
                        <div class="sq-friend-nav"><div class="fr-nav"><a href="javascript:;" class="on">我关注的</a> | <a href="javascript:;">我的粉丝</a></div><span>被<i><?=getNewsNums("kboy_forum_friend","tid=$uid")?></i>个人关注</span><span>&nbsp;&nbsp;&nbsp;&nbsp;<a href="javascript:void();" class="addfriends">添加好友</a></span></div>
                        <div class="sq-fr-bd">
                            <div class="sq-fr-pane current">
                                <div class="sq-fr-list">
								
									<?php
											$news_sql = "select * from kboy_forum_friend where uid=$uid order by id desc";
											$news_rows = mysql_query($news_sql);
											while($news_rs = mysql_fetch_array($news_rows)){
									?>
                                    <dl>
                                        <dt><a href="forum_news.php?uid=<?=$news_rs['tid']?>"><img src="<?=getClassName("kboy_user","user_face","uid=".$news_rs['tid'])?>" width="72" height="72" alt=""/></a></dt>
                                        <dd>
                                            <p class="name"><a href="forum_news.php?uid=<?=$news_rs['tid']?>"><?=getUserNickName($news_rs['tid'])?></a></p>
                                            <p class="num">粉丝：<?=getNewsNums("kboy_forum_friend","tid=".$news_rs['tid'])?></p>
                                            <p class="num">徒步：<?=getClassName("kboy_user", "user_km","uid =".$news_rs['tid'])?></p>
                                        </dd>
                                    </dl>
									<?php
											}
									?>

                                    </dl>
                                </div>
                            </div>
                            <div class="sq-fr-pane">
                                <div class="sq-fr-list">


									<?php
											$news_sql = "select * from kboy_forum_friend where tid=$uid order by id desc";
											$news_rows = mysql_query($news_sql);
											while($news_rs = mysql_fetch_array($news_rows)){
									?>
                                    <dl>
                                        <dt><a href="forum_news.php?uid=<?=$news_rs['tid']?>"><img src="<?=getClassName("kboy_user","user_face","uid=".$news_rs['tid'])?>" width="72" height="72" alt=""/></a></dt>
                                        <dd>
                                            <p class="name"><a href="forum_news.php?uid=<?=$news_rs['tid']?>"><?=getUserNickName($news_rs['tid'])?></a></p>
                                            <p class="num">粉丝：<?=getNewsNums("kboy_forum_friend","tid=".$news_rs['tid'])?></p>
                                            <p class="num">徒步：<?=getClassName("kboy_user", "user_km","uid =".$news_rs['tid'])?></p>
                                        </dd>
                                    </dl>
									<?php
											}
									?>
									
									
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
				
				
				<? include("_include.forum.right.php") ?>
				
				
            </div>
        </div>
    </div>
    <?php } ?>
    <!--foot begin-->
	<? include("_include.bottom.footbar.php") ?>
    <!--foot begin-->
    <!--左侧悬浮 begin-->
	<? include("_include.bottom.leftbar.php") ?>
    <!--左侧悬浮 end-->
    <!--右侧悬浮导航 begin-->
	<? include("_include.bottom.rightbar.php") ?>
    <!--右侧悬浮导航 end-->
    <script type="text/javascript" src="js/jquery-1.10.2.min.js"></script>
    <script type="text/javascript" src="js/jquery.SuperSlide.2.1.1.js"></script>
    <script type="text/javascript" src="js/main.js"></script>
    <script type="text/javascript" src="js/sq.js"></script>
	<script language="javascript" src="layer/layer.js"></script>
	<script language="javascript">
		$(document).ready(function(){
			$(".addfriends").click(function(){
				layer.open({
					type: 2,
					title: '加好友',
					shadeClose: true,
					shade: 0.8,
					area: ['640px', '70%'],
					content: 'forum_friend_search.php' //iframe的url
				}); 
			}); 
		});
	</script>
</body>
</html>

